import java.util.Scanner;
public class Main{
    public static void main(String[] args)
        {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int count=0;
        for(int i=1;i<=n;i++)
            {
            for (int j=1;j<=n;j++)
                {
                double cur = Math.pow(i,j);
                for(int k=1;k<=n;k++)
                    {
                    for (int f=1;f<=n;f++)
                        {
                        if(cur==Math.pow(k,f))
                            {
                            count++;
                        }
                    }
                }
            }
        }
        System.out.println(count%1000000007);
    }
}